var lifewayApp = angular.module('lifewayApp', []);

lifewayApp.controller("ProdutosListCtrl", function($scope, $http) {
	$http.get('php/teste_json.php').success(
			function(data, status, headers, config) {
				$scope.testes = data;
			}).error(function(data, status, headers, config) {
		// log error
	});

	
	$scope.menu = "";
	
	if(!(jQuery('#menu_id').val() == null)){
		$scope.menu = jQuery('#menu_id').val();
		$scope.query = jQuery('#menu_id').val();
	}

	$scope.clearBox = function() {
		$scope.query = "";
		$scope.menu = "";
	};
	$scope.esteiras = function() {
		$scope.query = "esteira";
		$scope.menu = "esteira";
	};
	$scope.elipticos = function() {
		$scope.query = "elipt";
		$scope.menu = "elipt";
	};
	$scope.bicicletas = function() {
		$scope.query = "bi";
		$scope.menu = "bi";
	};
	$scope.plataformas = function() {
		$scope.query = "plataforma";
		$scope.menu = "plataforma";
	};

});
